/**
 * 代理配置
 */

import config from './setting'
const gateway=config.proxyUrl
let proxyConfig= {
    proxy: {
        '/admin/': {
            target: gateway,
            changeOrigin: true,
            rewrite: (path) => path.replace(/^\/admin/, '/admin'),
        },
        '/auth/': {
            target: gateway,
            changeOrigin: true,
            rewrite: (path) => path.replace(/^\/auth/, '/auth'),
        },
        '/websocket/': {
            target: gateway,
            changeOrigin: true,
            rewrite: (path) => path.replace(/^\/websocket/, '/websocket'),
        }
    }
}

export default proxyConfig